#ifndef FONT_H
#define FONT_H

#include "gui.h"

//-------------------------------------------------------------------
#define FONT_CP_WIN     0
#define FONT_CP_DOS     1
#define FONT_CP_UTF8	2

#define  FONT_CP_WIN_1250       0
#define  FONT_CP_WIN_1251       1
#define  FONT_CP_WIN_1252       2
#define  FONT_CP_WIN_1254       3
#define  FONT_CP_WIN_1257       4

//-------------------------------------------------------------------
extern unsigned char current_font[256][16];

//-------------------------------------------------------------------
extern void font_init();
extern void font_set(int codepage);

void newfont_init();
int newfont_height();
int newfont_str_width(const char *str);
int newfont_char_width(unsigned short ch);
int newfont_draw_string_center_len(int x, int y, int len, char symbol, const char *str, color cl) ;
int newfont_draw_char(int x, int y, unsigned short ch, color cl) ;
int newfont_draw_symbol(int x, int y, int ch, color cl) ;
int newfont_draw_string(int x, int y, const char *str, color cl) ;
int newfont_draw_string_len(int x, int y, int len, const char *str, color cl) ;
int newfont_draw_string_right_len(int x, int y, int len, const char *str, color cl) ;

int newfont_load(char *file) ;
void newfont_load_from_8x16(unsigned char font[256][16]) ;
int newfont_load_symbol(char *file) ;
void newfont_set_codepage(int codepage) ;

unsigned short newfont_getc(const char *str, int *len);

//-------------------------------------------------------------------
#endif




